/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 
package edu.upc.spring.jmspro;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
 
/**
 @author DBA Carlo*/

public class jmsClient {
 
    public static void main(String[] args){
       ApplicationContext ctx = new 
 ClassPathXmlApplicationContext("edu/upc/spring/resource/jmscontext.xml"); 
          jmsService sender=(jmsService) ctx.getBean("messageService");
  
      sender.sendMessage();

 System.out.println("Message sent to server");

System.out.println("Message Received: "+sender.receiveMessage());
       
    }
    
}
